package com.lehecai.core.lottery.fetcher.lotterydraw.impl;

import com.lehecai.core.lottery.LotteryType;
import com.lehecai.core.lottery.fetcher.FetcherType;
import com.lehecai.core.lottery.fetcher.lotterydraw.LotteryDraw;
import com.lehecai.core.lottery.fetcher.lotterydraw.impl.worker.AbstractLotteryDrawFetchWorker;
import com.lehecai.core.lottery.fetcher.lotterydraw.impl.worker.LotteryDrawFetch520WorkerOfficial;
import com.lehecai.core.util.CoreFetcherUtils;

/**
 * Created by zhangzq on 14-12-1.
 *新疆风采35选7 官网抓取
 */
public class LotteryDrawFetcher520 extends BaseLotteryDrawFetcher {

    private static final LotteryType lotteryType = LotteryType.A_XJFC35;
    public LotteryDraw fetchOfficial(String phase) {
        AbstractLotteryDrawFetchWorker fetchWorker = new LotteryDrawFetch520WorkerOfficial(lotteryType);

        LotteryDraw resultListObj = fetchWorker.fetchResult(phase);
        LotteryDraw resultDetailObj = fetchWorker.fetchResultDetail(phase);

        LotteryDraw returnObj = CoreFetcherUtils.getComparedResult(resultListObj, resultDetailObj);
        return returnObj;
    }
    @Override
    protected FetcherType getDefaultFetcherType() {
        return FetcherType.T_OFFICIAL;
    }
}
